<?php
include './c/config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
 
$qu= array('a','b','c');
foreach ($qu as $value) {
	$sql="SELECT theday FROM `xge_pv` GROUP by theday";
	$query=$mysqli->query($sql);
	while ($list=$query->fetch_array()) {
		$sql="SELECT count(id) as count FROM `xge_pv` WHERE `ids` LIKE '".$value."' and theday='".$list['theday']."'  ";
	    $queryD=$mysqli->query($sql);
	    $getD=$queryD->fetch_array();
	    $num=$getD['count'];
	    echo $list['theday'].": 渠道".$value;
		echo "人数: $num";
		echo "<br>";

	}
	 echo "<br><br>";
}
echo "<br><br><br><br>";	

foreach ($qu as $value) {
	$sql="SELECT theday FROM `xge_pv` GROUP by theday";
	$query=$mysqli->query($sql);
	while ($list=$query->fetch_array()) {
		$sql="SELECT uid FROM `xge_pv` WHERE `ids` LIKE '".$value."' and theday='".$list['theday']."'   ";
		while ($list=$queryD->fetch_array()) {
			# code...
		}
	    $queryD=$mysqli->query($sql);
	    $getD=$queryD->fetch_array();
	    $num=$getD['count'];
	    echo $list['theday'].": 渠道".$value;
		echo "人数: $num";
		echo "<br>";

	}
	 echo "<br><br>";
}
 
	 
 
$mysqli->close();

   
?>